package com.atlas.alpha;

import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;

public class WorkoutActivity extends Activity {
	WorkoutDatabaseAdapter dbAdapter;
	Workout wrkOut;
	String id;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		super.onCreate(savedInstanceState);
		//setContentView(R.layout.activity_list);

		dbAdapter = new WorkoutDatabaseAdapter(this);
		dbAdapter = dbAdapter.open();
		wrkOut = new Workout();
	}

	public Workout getWorkout(String zoneID){
		this.id = zoneID;
		return dbAdapter.getWorkoutByID(id);
	}
	
	public List<Workout> getWorkoutList(String zoneID){
		this.id = zoneID;
		return dbAdapter.getWorkoutList(id);
	}
	
	public void addNewWorkout(String zoneID, String woName, String reps, String sets,String time, String desc){
		wrkOut = new Workout(zoneID, woName, reps, sets, time, desc);
		dbAdapter.addWorkout(wrkOut);
		
	}

	
}